package com.fuluwa.domain.bank.model;

import com.fuluwa.domain.shared.AbstractIdMantainceDomainObject;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

@Entity
@Table(name="b_acct_rate")
public class AccountRate extends AbstractIdMantainceDomainObject
{

  @Enumerated(EnumType.STRING)
  private Account.AccountType fromType;

  @Enumerated(EnumType.STRING)
  private Account.AccountType toType;
  private float rate;

  private AccountRate()
  {
  }

  public AccountRate(Account.AccountType fromType, Account.AccountType toType, float rate)
  {
    this.rate = rate;
    this.fromType = fromType;
    this.toType = toType;
  }

  public float getRate() {
    return this.rate;
  }

  public Account.AccountType getFromType() {
    return this.fromType;
  }

  public Account.AccountType getToType() {
    return this.toType;
  }
}